<template>
	<view class="layout">
		<view class="navbar">
			<view class="statusBar" :style="{height:getStatusBarHeight()+'px'}">

			</view>
			<view class="titleBar" :style="{height:getTitleBarHeght()+'px'}">
				<view class="title">标题</view>
				<view class="search">
					<uni-icons class="icon" type="search" color="#888" size="18"></uni-icons>
					<text class="text">搜索</text>
				</view>
			</view>
		</view>

		<view class="fill" :style="{height:getStatusBarHeight()+getTitleBarHeght()+'px'}"></view>
	</view>
</template>

<script setup>
	import {
		getStatusBarHeight,
		getTitleBarHeght
	} from "@/utils/system.js"
</script>

<style lang="scss">
	.layout {
		.navbar {
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			z-index: 10;
			background:
				linear-gradient(to bottom, transparent, #fff 400rpx),
				linear-gradient(to right, #beecd8 20%, #f4e2d8);
		}

		.statusBar {}

		.titleBar {
			display: flex;
			align-items: center;
			padding: 0 30rpx;

			.title {
				font-size: 22px;
				font-size: 700;
				color: #000;
			}

			.search {
				width: 220rpx;
				height: 50rpx;
				border-radius: 60rpx;
				background: rgba(255, 255, 255, .4);
				border: 1px solid #fff;
				margin-left: 30rpx;
				color: #999;
				font-size: 28rpx;
				display: flex;
				align-items: center;

				.text {
					padding-left: 10rpx;
				}

				.icon {
					margin-left: 5rpx;
				}
			}
		}
	}
</style>